Optimization model for multi-products multi-periods multi-suppliers raw-material selection and composition, and order quantity problem with one-year minimum order quantity contract

This paper concerns the optimization model for a multi-product multi-period raw-material selection and composition, and order quantity problem faced by a beverage company.• There are some criteria in raw material selection, which we accommodate all the criteria in the objective function. There are several suppliers, and one of the decision criteria is a one-year minimum order quantity contract between the company and the suppliers. The actual one-year demand for raw materials may deviate significantly from the one-year minimum order quantities.• We derive a function that can be regarded as a penalty function to maintain the total order quantities in one year to fulfill the minimum one-year order quantity contracts. This penalty function is a part of the objective function and can be relaxed once the one-year minimum order quantity contracts are fulfilled.• We performed several numerical experiments to check the optimal solutions for various demands and for various objective functions. These experiments show our MILP (Mixed Integer Linear Programming) gives the desired optimal solutions and show the influence of decision criteria on the optimal solution.


Problem
This paper concerns the optimization model for supplier selection, order allocation, and raw-material composition in a beverage company that produces many drink powders.The optimization model is developed in conjunction with the development of a decision support system for monthly decision-making by the company, which involves supplier selection, order allocation, and raw material composition.Prior to implementing this system, the monthly decisions were made manually, leading to significant energy consumption, mainly because the underlying decision-making problem is complex.
There are several suppliers that can provide the same key raw material of the drink powders, but the color or some physical characteristics are slightly different, so we may assume those raw materials are different.The drink powders produced by this company, which in the remainder of this paper are called items, can be classified into two classes of items.
• The first class consists of items that can be produced by using exactly a single type of raw material.
• The second class consists of more flexible items, where each item in this class can be produced using one raw material or a composition of several raw materials.For each item in this class, we then have a set of possible raw materials.The sets of materials may vary from one to the other.
To avoid supply disruption, the company has decided to use multiple sources for these raw materials.The company has established selection criteria for each raw material, which are based on the estimated one-year total demand of raw materials and a subjective assessment of whether the raw material cannot be substituted, price, service, and the minimum order required for each purchase.After determining the score for each raw material, the company decided to make contracts or agreements with six suppliers.Each contract stated the unit price and the minimum order quantity within a year.Based on these contracts, production planning and inventory control of raw materials are carried out.
The estimated total one-year demand for items is obtained from the forecasting process performed yearly.This forecasting process yields the monthly total demand for items, which is timevarying.But at the production level, the company refines the monthly total demand as a response to disruptions such as sudden additional requests due to flash sales practices in e-commerce, and others.
Once the demand for items for a month is issued, the company must make the decision to purchase the raw materials from some suppliers.This purchase decision from a supplier includes the purchase of four serial deliveries one week apart.The first delivery must be no later than 17 days before the following month's start.The 17 days here is the total time required for the company's internal inspection and preparation of raw materials.This decision process is complex since many items must be produced which mostly belong to the second class, and the monthly demand may vary.Additionally, the company imposes a production regulation for the second class of items because of the multiplesources policy, which states that each item in the second class must be produced using a composition of at least two types of the corresponding possible raw materials.The decision process must be performed carefully to obtain results in the form of: • which raw materials are purchased along with the delivery size for every four corresponding weeks, • the composition of raw materials for every item in the second class which must be produced, while minimizing the total inventory cost.
The optimization model we derive in this paper can be categorized as a multi-product multi-period raw material selection and composition, and order quantity problem, which we write as a mixed integer linear programming.The optimization model and its solution method are the backbones of the decision support system since it defines the problem space and guides the search for the optimal solution.

Production planning and inventory control for raw materials
As mentioned above, the company deals with six raw material suppliers.The decision process for supplier selection and order allocation is carried out every month based on the results of demand forecasting at the beginning of the year and production performance in the previous month.From this demand forecasting process, the company then makes the purchase and sales agreements with all six suppliers concerning the one-year minimum purchase, unit price, and minimum one-month delivery.The serial process in one calendar year can be seen in Fig. 1 .At the beginning of the month, the company forecasts the demand for items in the following month.
From the estimated monthly demand for items obtained from the yearly forecasting process, we can directly find out the estimated monthly total demand for raw materials in one year.In practice, this one-month estimated demand must be reviewed due to several things, such as production in the previous month experiencing disruptions, sudden additional requests due to flash sales practices in e-commerce, and others.Reviewing the one-month demand and determining the production schedule we call production planning for one month.
As soon as the production planning is performed, the company performs the decision process for purchasing the raw materials from some suppliers.In the following, we assume that one month can be divided into four weeks (the fourth week may be longer than seven days).This purchase decision covers purchases for four serial deliveries one week apart.The first delivery must be no later than 17 days before the following month's start since the internal inspection and the preparation for the raw materials delivered takes  The decision process considers some parameters for decision making such as: • raw materials purchase prices, • existing stock of raw materials in the warehouse, • the one-month minimum delivery of raw materials (if ordered), • the one-year minimum purchase of each raw material, • raw-material flexibility of each item, which is known by the number of raw materials that can be used to produce the item.The larger this number for an item, the more flexible the item, • and others.
The purchase must also comply with the company's internal policies in the following.
Policy 1. purchase raw materials from at least two suppliers to maintain supply security, Policy 2. if an item must be produced by using more than one raw material, the proportions of raw materials used are the same.
In the following section, we will accommodate all these policies into some constraints of an optimization model that can be regarded as the main engine of the Decision Support System developed by the company to achieve an optimal decision in inventory control.

Mathematical model of the problem
In this section, we formulate a mathematical model of the decision problem.As described, we need to decide on raw material selection, delivery quantities, and compositions on the four consecutive weeks covered.In the following, we derive a mixed integer linear programming that represents the decision problem.We first present the sets, the parameters, and the decision variables used in the mathematical model.We then present the constraints which represent the production rules and capacity, followed by the discussion concerning the objective function of the optimization model.The integer linear programming is written after that.

Sets and parameters
•  = { 1 , 2 , 3 , 4 } as the set of weeks on the supply cycle, •  as the number of raw materials, •  ∈   as the set of items to be produced on the planning horizon, where   as the set of items to be produced on week , 1 , if item  can be produce by using raw material  0 , otherwise • For  ∈   ,   as the demand of raw material k item i on week j, • For  ∈ ,   as the set of the total demand on week , • For  ∈  ,   as the minimum one-year order quantity of raw material  , • For  ∈  ,   as the unit price of raw material  , • For  ∈  ,   as the one-month minimum order quantity of raw material  , if purchased, • For  ∈  ,  0  as the level of inventory of raw material  just before the first delivery on the first week, •  as the safety stock for each raw material at the end of each week, • maxcap as the warehouse capacity, • hc as the holding cost per item per week.

Decision variables
Define: • ∀ ∈ ,   as the amount of raw material  purchased.  = 0 if raw material  is not purchased, and The variables   are defined to handle the discontinuity property of the variables   .The relationship between   and   are written as constraints (1) and (2) .
• ∀ ∈ , ∀ ∈ , x  as the amount of raw material  delivered at the beginning of week .
1 , if item  on the week  produce by using raw material  0 , otherwise • ∀ ∈ , ∀ ∈   , ∀ ∈ ,   as the proportion of raw material k in item i produced in week j.
• ∀ ∈ , ∀ ∈ ,   as the level of inventory raw material  at the end of week .

Constraints
The following mathematical expressions are the constraints for our mathematical model.We write these constraints in groups where we give a concise explanation in each group are for creating them.
Constraint I are set to handle the discontinuity value of   .∀ ∈  , The relations ( 1) and ( 2) along with the definition of   ensure the value   = 0 or   ≤   ≤ .As an illustration, suppose that we obtain a solution in which   = 1  2   for some  .It follows that   = 0 , and satisfaction of ( 1) and (2) will yields   = 0 .This contradicts the assumption that   ≤   ≤ .
Constraint II is set to fulfill the weekly allocation of each type of raw material.∀ ∈  , Constraint III is set to fulfill the raw material demand each week.∀ ∈  , Constraint IV is set to ensure each item in  2 is produced by using at least two raw materials.∀ ∈ , ∀ ∈ For a small value of .The explanations for the relations 6 ), ( (7) , and ( 8) are similar to one for relations (1) and (2) .
Which states that the total proportion of raw materials used for item  produced on week  must be equal to 1.
The relations (10) and (11) enforce that if item  produced on week  using two different raw materials  1 and  2 with   1 ≠   2 , then the left-hand sides of ( 10) and ( 11) are equal to zero meanwhile one of the right-hand side of 10 or (11) is less than zero.It concludes that   1 and   2 must be equal.
Constraints VII are set to ensure that the level of inventory just after raw material delivery does not exceed the maximum capacity.On the beginning of week 1: Constraint VIII is set to ensure that the level of inventory at the end of each week must be greater than or equal to the safety stock.∀ ∈ , ∀ ∈  ,

Objective functions
We define the objective function as the sum of the holding cost, the purchase cost, and a function for accommodating the one-year minimum order quantity contracts.The level of inventory of raw-material k for one week can be seen in Fig. 3 .
So that the holding cost can be given as: Meanwhile the purchase cost can be given as: Fig. 3. Illustration for level of inventory on the period between week j and week j + 1.
We consider another function in the objective function, which is created to accommodate the one-year minimum order quantity contracts.
Constraints I -VIII concern the fulfillment of the one-month minimum order quantity contract, the monthly demand, warehouse capacity constraint, safety stock constraint, and raw material composition requirements.Meanwhile, the one-year minimum order quantity contract is quite difficult to express as a constraint in the optimization model with a one-month-long planning horizon.
Therefore, we accommodate the yearly purchase contract which we represent as a part of the objective function of our optimization problem.To fulfill the one-year minimum order quantity contracts, we define a penalty function: Where   is multiplier constants that will be discussed later.By denoting x as the vector with elements   and x  , and z as the vector with elements   the objective function of our optimization model is then can be written as:

Optimization model
The optimization model for supplier selection, order allocation, and raw material composition can be written as a mixed integer linear programming: where the set of Constraint I up to Constraints VIII are given by equations ( 1) - (15) .

Method validation
In this section, we give an example of the solution of the optimization model we derived in the previous section.In this example, we consider an instant where N = 6 and I = 51, so that we have 2508 decision variables.

Parameter values
The following Table 1 show the matrix of raw-material flexibility of all items.Next, we present the instant of the total raw material demands during a planning horizon in Table 2 .We can see that items 5 and 36 do not have to be produced during this planning horizon.We also see that most items must be produced within only two or three weeks of this planning horizon, with varying demand.The other parameter values are given in the following Table 3 .
From Table 2 we know that raw material 4 must be purchased since item 49 and 50 can be produced just by using raw material 4. The price of raw material 4 is the lowest one.But the one-year minimal order quantity is the third smallest.So that we may guess that the optimal solution,  4 will have immense value but is not the biggest one, among others.The value of one-year minimum order will be reviewed by the company every semester.However, the order proportion per supplier remains the same.

Validation
We solve the optimization problem by creating computer codes using R language (version 4) where the optimization problem formulation and the solution technique used are referred to dplyr [ 1 ] and ompr [ 2 ] libraries.

Table 1
The flexibility matrix of items 1-51 and raw material 1-6.

Item
Raw material The values of   ,  ∈  are given in the second column of Table 4 in the following.The weekly deliveries are given on columns 4 up to 6.We see that the total one-month order quantity exceeds the one-month minimum order quantity   , so that set of Constraints I is satisfied.
Another decision variables, such as: x  ,   ,   , and   are in optimal solution.We have checked that set of Constraints II -V are satisfied with this optimal solution.For brevity, we do not present those values here.We just present and discuss some of them, to show that the remaining constraints are Satisfied.
Most values of   are 0.5 which means most of items are produced by using a composition of two raw materials.The values of   may vary from one week to another week, as illustrated in Table 5 .The composition of raw materials for item 46 in week 1 is different from the composition in week 2. Furthermore, Table 5 shows us that the proportions of raw materials used for producing an item are the same.We have checked this property through all for all and for all so that we are sure that set of Constraints VI are satisfied.

Table 2
The raw material demand (in kg) of items 1-51.

Item
Raw material demand in week:

Table 6
The values of   for i = 49 and i = 50 .The following Table 6 shows the composition of raw materials for items 49 and 50.We can see that these items are produced by using raw material 4, which confirms the flexibility matrix in Table 2 .
The fulfillment of the safety stock constraint and the maximum capacity constraint (set of Constraints VII and VIII) can be seen in the following Table 7 and 8 .
Note that the objective function's definition, which accommodates the one-year minimum order quantity contract, yields a balancing of purchase price criteria and the one-year minimum order quantity criteria.In the following table, we represent the optimal solutions obtained using different objective functions.Notice that the total raw materials purchased in all solutions are different.

Table 8
the fulfillment of the safety stock constraint and the maximum capacity constraint (set of constraints VII and VIII).

Table 9
Comparison among order quantities obtained by using different objective functions.

Raw material
Optimal solution   obtained by objective function: • Objective function I: • Objective function II:

𝑐 𝑘 𝑥 𝑘
• Objective function III: Fig. 4. Comparison between the one-year minimum order quantities and the optimal order quantities for the instant problem by using objective function III.
From Table 9 we see if we just use the purchase price in the objective function, raw material 4 is purchased with the biggest amount.But since the distribution of   raw material 4 has the second smallest value, then if we consider this distribution in the objective function, raw material 4 is purchased with a smaller amount.Total purchased price from all solutions are acceptable for business.But solution obtained by objective function III has the lowest total purchase price.
In the following Fig. 4 , we compare the distribution of one-year minimum order quantities with the distribution of one-month order quantities obtained by using objective function III.This comparison shows that objective function III is effective for finding order quantities whose distribution is similar to distribution of one-year minimum order quantities.
The last thing to be discussed is the multiplier parameter   .These parameters should be set as a positive number in the early months of the year, when the one-year minimum order quantity contracts are still far away from being fulfilled.As soon as the contract for raw material k is fulfilled, we can set   = 0 for some  .
We performed several numerical experiments to check the optimal solutions for various demands and objective functions.From this experimentation, we are sure that our MILP gives the desired optimal solutions.

Conclusion
In this paper, we present a mixed-integer linear program (MILP) for raw-material selection and composition, and an order allocation problem faced by a beverage company.We performed several numerical experiments to check the optimal solutions for various demands and objective functions.Throughout all our experimentations, the optimization model we derived consistently provides solutions that satisfy all constraints.This gives us great confidence in having derived an optimization problem that accurately represents the challenges faced by the company.It also should be noticed that dplyr [ 1 ]package R programming language can handle data manipulation faster and in an easier way.So, if some constraints are changed or there are some new constraints that have to be added, the use of dplyr package will not give us any difficulty in handling data manipulation as long as we have performed an appropriate modification.Meanwhile, the ompr [ 2 ] package can model MILP in an algebraic way directly in R and offers the possibility to solve a model with different solvers.Both packages produce optimal solutions efficiently, only requiring on average 50.8 s for searching the problem, which involves 2508 decision variables.
We realize that the search time for the optimal solution will increase as the number of decision variables increases.Due to the lack of similar large-sized problems faced by the other companies, we have not conducted numerical experimentation on larger problem sizes so that we cannot say anything about the performance of dplyr and ompr packages in solving large-sized problems.
It should be noticed that the definition of objective function III which accommodates the one-year minimum order quantity contract yields a balance of purchase price criteria and the one-year minimum order quantity criteria.In the following table we represent the optimal solutions obtained by using different objective functions.

Introduction and Supporting Articles
This paper concerns the derivation of the optimization model, which can be categorized as a multi-product multi-period multisupplier raw material selection and composition, and order quantity problem.The multi-product multi-period multi-supplier raw material selection problem has been addressed in several articles such as Sambatt, Woarawichai, and Naenna [ 3 ], but they do not address the minimum one-year order quantity contracts so that their optimization problem is simpler than our optimization problem.In general, our optimization problem is much more complex compared to the one criterion supplier selection studied in an enormous articles such as Reck & Long [ 4 ], Monckza & Trecha [ 5 ], & Porter, and Harding papers.Later, supplier selection research has developed into a problem with multiple criteria, such as criteria for quality of goods, on-time delivery, and after-sales service, as well as environmental and socio-political criteria for suppliers (see Smytka & Clemens [ 6 ], Gray [7] ).What is interesting is that, in general, these criteria contradict each other.For example, goods offered at low prices (positive values for the price criteria) may have negative values for on-time delivery criteria.The complexity of this issue is compounded by the fact that some criteria are quantitative (price, timeliness of delivery, specification/quality of goods, etc.), but other criteria are qualitative (after-sales service, environmental and socio-political criteria of suppliers).
The paper by Weber Current & Benton (Co Ao [ 8 ]) is a paper at the beginning of this research on multi-criteria supplier selection, which presents research results with four criteria, namely Price, Quality, Delivery and Service (PDQS).This paper together with Hurkens, van der Valk, Wynstra [ 9 ] introduces the supplier selection problem under the concept of Total Cost Ownership (TCO), a financial analysis tool to examine the direct and indirect costs of a product's production.These direct and indirect costs then become the criteria in the supplier selection process.These papers on TCO include Ferrin & Plank [ 10 ], Degraeve & Roodhooft [ 11 ].Our optimization problem is categorized as a multi-criterion one, where one of the criteria is a new one, i.e. the minimum one-year order quantity.
After the rise of conceptual research on supplier selection with multi-criteria, then we quite easily find a proposal to use the Analytic Hierarchy Process (AHP), a decision-making method when it comes to ranking of many criteria (see Dyer [ 12 ]), as a method of solving supplier problems.selection.AHP provides a framework for addressing various criteria involving intuitive, rational, qualitative, and quantitative aspects.Other papers that discuss the AHP approach to supplier selection solutions include Bard, Belton [ 13 ], Bhutta & Huq [ 14 ], Nydick & Hill [ 15 ].
Another method proposed as a solution to the supplier selection problem is an optimization method or mathematical programming as proposed by Degraeve & Roodhooft [ 11 ], Khalifa & Mohammed Al-Shabi [ 16 ], and Nispeling [ 17 ].A special optimization method, namely multi-objective goal programming, was proposed by Weber & Ellram (C. A. [ 18 ]).Multi-objective programming is very suitable to be used to resolve conflicts between existing criteria and the existence of just-in-time scenarios.Meanwhile, Masella & Rangone [ 19 ] offer a dynamic programming method as a method of completing this supplier selection, where input variables are set as controls and environmental variables and status variables are set as the internal workings of the organization, and output variables are seen as company performance.Another optimization method used as a solution method is Data Envelopment Analysis (DEA), as proposed in the paper of Pitchipoo, et al. [ 20 ] and Shahrzad, et al. [ 21 ].
Apart from these methods, we get the combined use of the two methods above (hybrid method), such as the one proposed by Li, Wong, & Kwong [ 22 ] which combines the AHP method and multi-objective programming.Another approach is the metaheuristic method proposed by Alejo-Reyes, et al. [ 23 ].

Fig. 1 .
Fig. 1.An illustration of the production planning, supplier selection, and order allocation processes in one year.

Table 3
The other parameter's value.

Table 4
Total order quantity and weekly deliveries.

Table 5
The values of   for i = 45 and i = 46 .

Table 7
Weekly raw material demand, delivery, and level of inventory.